package cn.cls;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class testMap {

	public static void main(String[] args) {
		Map map = new HashMap();

		for (int i = 0; i < 10; i++) {
			map.put(Integer.valueOf(i), String.valueOf(i * 10));
		}

		System.out.println(map.keySet());
		System.out.println(map.entrySet());
		map.put(null, null);
		Iterator itr = map.entrySet().iterator();
		Set itr2 = map.keySet();
		while (itr.hasNext())
			System.out.print(itr.next() + " ");

		System.out.println();
		if (map.containsValue(null))
			map.remove(null);
		for (Object obj : itr2) {

			System.out.print(obj + " ");
			if (map.containsKey(obj))
				System.out.println(map.get(obj));
		}

	}

}
